package com.ims.client.util;

import cn.hutool.crypto.asymmetric.KeyType;
import cn.hutool.crypto.asymmetric.SM2;

public class EncryptUtil {
    private static final String publicKey = "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEys1DS7FwYpTBL8riMZdCndzxrr+zQuVC1TDy8g+5fA3AHp+AJ6rnRqZqxc7bDY3y6bUXoRfSErb3MBeJhoMYkQ==";
    private static final SM2 sm2 = new SM2(null, publicKey);

    public static String sm2Encrypt(String msg){
        return sm2.encryptBase64(msg, KeyType.PublicKey);
    }
}
